package org.example.struct.array;

/**
 * @author liyishan
 * @date 2024/9/5 09:21
 * @apiNote
 */

public class Test03174ClearDigits {
    public String clearDigits(String s) {
        StringBuilder res = new StringBuilder();
        for(char c : s.toCharArray()){
            if(Character.isDigit(c)){
                res.deleteCharAt(res.length()-1);
            }else{
                res.append(c);
            }
        }
        return res.toString();
    }

}
